import 'package:flutter/material.dart';

const double hitRadius = 40.0;
const double safeSpace = 10.0;

abstract class Layer {
  bool selected = false;
  String? id; // 加个标识

  void paint(Canvas canvas, Size size);
  bool hitTest(Offset p);
  void onPanStart(Offset localPos, Size boundary);
  void onPanUpdate(Offset localPos, Size boundary);
  void onPanEnd(Size boundary);

  dynamic getMetric(); // 返回面积或长度
}
